<template>
    <div>
         <div class="banner" @click="handleGallary">
            <img class="banner-img" :src="bannerImg" />
            <div class="banner-info">
            <div class="banner-title">{{this.sightName}}</div>
            <div class=" banner-number"><span class="iconfont banner-icont">&#xe692;</span>{{this.bannerImgs.length}}</div>
            </div>
        </div>
        <commen-gallary :imgs="bannerImgs" v-show="showGallary" @close="handleGallaryClose"></commen-gallary>
    </div>

</template>
<script>
import CommenGallary from 'commen/gallary/Gallary'
export default {
    name:'DetailBanner',
    props:{
        sightName:String,
        bannerImg:String,
        bannerImgs:Array
    },
    data(){
        return {
            showGallary:false
            
        }
        

    },
    components:{
        CommenGallary
    },
    methods:{
        handleGallary(){
            this.showGallary=true
        },
        handleGallaryClose(){
            this.showGallary=false 
        }
    }
}
</script>

<style lang="stylus" scoped>
.banner
    position :relative
    overflow:hidden
    height:0
    padding-bottom:55%
    .banner-img
        width:100%
    .banner-info
        display :flex
        position:absolute
        left:0
        right:0
        bottom:0
        line-height:30px
        color:#fff
        background-image :linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,0.8))
        .banner-title
            flex:1
            padding:0 10px
            font-size:16px
        .banner-number
            margin-top:7px
            padding:0 20px
            line-height:16px
            height :16px
            border-radius :5px
            background:rgba(0,0,0 0.8)
            font-size:12px
            .banner-icont
                font-size:12px
 

</style>
